BMW – AI Telemetry Narrator
In Short
A full-stack intelligent telemetry system that ingests continuous automotive sensor streams, detects critical driving events, and produces real-time, context-aware driving guidance with a local LLM.
System Architecture & Pipeline
The platform operates through a five-stage reactive pipeline:
- Telemetry Simulation (Python): Generates synthetic vehicle metrics, including velocity profiles and tri-axial G-force telemetry, to emulate physical CAN-bus signals.
- Message Broker (MQTT / Mosquitto): Handles lightweight publish-subscribe messaging over WebSockets for low-latency metric ingestion.
- Frontend Aggregation (React + TypeScript): Converts high-frequency scalar data into real-time metrics, rolling trends, and threshold-based events.
- Local AI Inference Gateway (Node.js + Express): Applies server-side rate limiting, prompt sanitization, and structured context assembly before querying local edge models.
- Narrative Feedback (Ollama / Llama): Generates actionable tactical feedback for the live telemetry HUD.
Key Technical Implementations
- Deterministic Rule Engine Before GenAI: The client validates hard braking, lateral slippage, and other events before triggering inference, preserving real-time responsiveness.
- Prompt Hardening & Safe LLM Orchestration: The backend converts sensor snapshots into schema-bound prompts and enforces a strict latency budget.
- Dynamic Time-Series Visualization: Recharts renders high-frequency G-force and speed curves beside synthesized natural-language guidance.
Data Structuring
The frontend organizes continuous signals into three layers: current state, trend, and event. This turns raw telemetry into context that can be evaluated and displayed consistently.

Rules First, AI Second
Deterministic logic checks driving events before the system calls the local model. After a trigger, the backend formats a constrained prompt and manages the Ollama request, keeping the response stable and fast.


Real-time HUD Interface
The live interface brings vehicle state, time-series telemetry, detected events, and concise AI guidance into one view so the driver can understand both what is happening and why.
